﻿@model List<RoadQualityEvalAPI.Models.SpeedbumpModel>

@{
    Layout = null;
    var totalSb = Model.Count;
}

<h4>Collected speedbumps statistics (data from Android clients):</h4>
<hr />
<div id="speedbumps_general_stats">

    <div class="row">
        <p>General information regarding gathered speedbumps (stats, etc.)</p>
    </div>

    <div class="row">
        @Html.Label("Total speedbumps: " + totalSb)
    </div>


    <div class="row">

        <table class="customTable">
            <tr>
                <th>
                    @Html.DisplayNameFor(m => m.FirstOrDefault().CreatedAt)
                </th>
                <th>
                    @Html.DisplayNameFor(m => m.FirstOrDefault().Description)
                </th>
                <th>
                    @Html.DisplayNameFor(m => m.FirstOrDefault().Location)
                </th>
                <th>
                    @Html.DisplayNameFor(m => m.FirstOrDefault().Username)
                </th>
                
            </tr>

            @foreach (var sb in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(m => sb.CreatedAt)
                    </td>
                    <td>
                        @Html.DisplayFor(m => sb.Description)
                    </td>
                    <td>
                        @Html.DisplayFor(m => sb.Location)
                    </td>
                    <td>
                        @Html.DisplayFor(m => sb.Username)
                    </td>
                    
                </tr>
            }

        </table>

    </div>


</div>